Proxy Auto Config (PAC) file parser systems and methods

ABSTRACT

Proxy Auto Config (PAC) file parser systems and methods enable file parsing on user devices without Just-in-Time (JIT) compilation in JavaScript, with a memory efficient implementation and with efficient performance. The PAC parser supports multi proxy connections, traffic rules (e.g., bypass/send to proxy, etc.) based on various PAC functions, etc. The PAC parser can be utilized on a user device with an enterprise application and with cloud-based services.

FIELD OF THE DISCLOSURE

The present disclosure relates generally to networking and computing.More particularly, the present disclosure relates to Proxy Auto Config(PAC) file parser systems and methods.

BACKGROUND OF THE DISCLOSURE

A Proxy Auto-Config (PAC) file defines how web browsers and other useragents, executed on a user device, can automatically choose theappropriate proxy server (access method) for fetching a given UniformResource Locator (URL). PAC files are JavaScript (JS)-based files thatreturn proxies based on expressions within the file. To parse PAC fileson user devices, certain PAC parsers have been built over certainJavaScript engines, e.g., SpiderMonkey, V8, etc. However, some userdevices over certain platforms do not support certain aspects of JS. Forexample, iOS (from Apple Corporation) does not support a Just-In-Time(JIT) compiler that is a component of the Java Runtime Environment (JRE)that improves the performance of Java applications at run time. WithoutJIT support, various functions required for PAC parsing are notavailable on platforms such as iOS. Of note, iOS is widely deployed formobile devices including smartphones and tablets. There is a need forPAC parsing support on such platforms in the absence of JIT support.

BRIEF SUMMARY OF THE DISCLOSURE

The present disclosure relates to Proxy Auto Config (PAC) file parsersystems and methods. The present disclosure enables PAC file parsing onuser devices without JIT, with a memory-efficient implementation, andwith efficient performance. The PAC parser supports multi-proxyconnections, traffic rules (e.g., bypass/send to proxy, etc.) based onvarious PAC functions, etc. In an embodiment, the PAC parser isimplemented in native iOS languages, such as Objective-C, using a nativeJS engine.

In an embodiment, a non-transitory computer-readable storage mediumhaving computer-readable code stored thereon for programming a userdevice to perform steps of obtaining a Proxy Auto Config (PAC) file froma cloud service and initializing a PAC parser on the user devicetherewith; for a request to access a Uniform Resource Locator (URL),extracting a hostname and providing the hostname to the PAC parser; andbased on an Internet Protocol (IP) address associated with the hostname,one of i) sending the request direct to the Internet separate from thecloud, ii) sending the request to a first proxy associated with thecloud service, and iii) sending the request to a second proxy associatedwith the cloud service. The user device can include an operating systemthat does not support a Just-In-Time (JIT) compiler. The PAC parserperforms a plurality of PAC functions that require the JIT compiler viaa call to code implemented in a native language. The sending steps canbe performed based on a prefix of the IP address. The sending steps tothe first proxy and the second proxy can be performed based on thehostname. The cloud service can be a cloud-based security system and thefirst proxy and the second proxy are based on rules of the cloud-basedsecurity system. The first proxy can be for private traffic and thesecond proxy can be for public traffic.

In another embodiment, a user device includes a network interfacecommunicatively coupled to a network; a processor communicativelycoupled to the network interface; and memory storing computer-executableinstructions that, when executed, cause the processor to obtain a ProxyAuto Config (PAC) file from a cloud service and initializing a PACparser on the user device therewith; for a request to access a UniformResource Locator (URL), extract a hostname and providing the hostname tothe PAC parser; and based on an Internet Protocol (IP) addressassociated with the hostname, one of i) send the request direct to theInternet separate from the cloud, ii) send the request to a first proxyassociated with the cloud service, and iii) send the request to a secondproxy associated with the cloud service. The user device can include anoperating system that does not support Just-In-Time (JIT) complier. ThePAC parser performs a plurality of PAC functions that require the JITcompiler via a call to code implemented in a native language. Thesending steps can be performed based on a prefix of the IP address. Thesending steps to the first proxy and the second proxy can be performedbased on the hostname. The cloud service can be a cloud-based securitysystem and the first proxy and the second proxy are based on rules ofthe cloud-based security system. The first proxy can be for privatetraffic and the second proxy can be for public traffic.

In a further embodiment, a method includes obtaining a Proxy Auto Config(PAC) file from a cloud service and initializing a PAC parser on theuser device therewith; for a request to access a Uniform ResourceLocator (URL), extracting a hostname and providing the hostname to thePAC parser; and based on an Internet Protocol (IP) address associatedwith the hostname, one of i) sending the request direct to the Internetseparate from the cloud, ii) sending the request to a first proxyassociated with the cloud service, and iii) sending the request to asecond proxy associated with the cloud service. The user device caninclude an operating system that does not support a Just-In-Time (JIT)compiler. The PAC parser performs a plurality of PAC functions thatrequire the JIT compiler via a call to code implemented in a nativelanguage. The sending steps can be performed based on a prefix of the IPaddress. The sending steps to the first proxy and the second proxy canbe performed based on the hostname. The cloud service can be acloud-based security system and the first proxy and the second proxy arebased on rules of the cloud-based security system.

BRIEF DESCRIPTION OF THE DRAWINGS

The present disclosure is illustrated and described herein withreference to the various drawings, in which like reference numbers areused to denote like system components/method steps, as appropriate, andin which:

FIG. 1 is a network diagram of a cloud-based system for implementingvarious cloud-based service functions;

FIG. 2 is a block diagram of a server which may be used in thecloud-based system of FIG. 1 or the like;

FIG. 3 is a block diagram of a mobile device which may be used in thecloud-based system of FIG. 1 or the like;

FIG. 4 is a network diagram of the functionality of an exampleenterprise application and associated connectivity; and

FIG. 5 is a flowchart of a PAC parsing process.

DETAILED DESCRIPTION OF THE DISCLOSURE

Again, the present disclosure relates to Proxy Auto Config (PAC) fileparser systems and methods. The present disclosure enables PAC fileparsing on user devices without JIT, with a memory-efficientimplementation, and with efficient performance. The PAC parser supportsmulti-proxy connections, traffic rules (e.g., bypass/send to proxy,etc.) based on various PAC functions, etc. In an embodiment, the PACparser is implemented in native iOS languages, such as Objective-C,using a native JS engine.

Example Cloud System Architecture

FIG. 1 is a network diagram of a cloud-based system 100 for implementingvarious cloud-based service functions. The cloud-based system 100includes one or more cloud nodes (CN) 102 communicatively coupled to theInternet 104 or the like. The cloud nodes 102 may be implemented as aserver 200 (as illustrated in FIG. 2), or the like, and can begeographically diverse from one another such as located at various datacenters around the country or globe. For illustration purposes, thecloud-based system 100 can include a regional office 110, headquarters120, various employee's homes 130, laptops/desktops 140, and mobiledevices 150 each of which can be communicatively coupled to one of thecloud nodes 102. These locations 110, 120, 130, and devices 140, 150 areshown for illustrative purposes, and those skilled in the art willrecognize there are various access scenarios to the cloud-based system100 all of which are contemplated herein.

Again, the cloud-based system 100 can provide any functionality throughservices such as software as a service, platform as a service,infrastructure as a service, security as a service, Virtual NetworkFunctions (VNFs) in a Network Functions Virtualization (NFV)Infrastructure (NFVI), etc. to the locations 110, 120, 130 and devices140, 150. The cloud-based system 100 is replacing the conventionaldeployment model where network devices are physically managed and cabledtogether in sequence to deliver the various services associated with thenetwork devices. The cloud-based system 100 can be used to implementthese services in the cloud without end-users requiring the physicaldevices and management thereof. The cloud-based system 100 can provideservices via VNFs (e.g., firewalls, Deep Packet Inspection (DPI),Network Address Translation (NAT), etc.). VNFs take the responsibilityof handling specific network functions that run on one or more virtualmachines (VMs), software containers, etc., on top of the hardwarenetworking infrastructure—routers, switches, etc. Individual VNFs can beconnected or combined together as building blocks in a service chain tooffer a full-scale networking communication service. The cloud-basedsystem 100 can provide other services in addition to VNFs, such asX-as-a-Service (XaaS), where X is security, access, etc.

Two example services include Zscaler Internet Access (ZIA) (which cangenerally be referred to as Internet Access (IA)) and Zscaler PrivateAccess (ZPA) (which can generally be referred to as Private Access(PA)), from Zscaler, Inc. (the assignee and applicant of the presentapplication). The IA service can include firewall, threat prevention,Deep Packet Inspection (DPI), Data Leakage Prevention (DLP), and thelike. The PA can include access control, microservice segmentation, etc.For example, the IA service can provide a user with Internet Access, andthe PA service can provide a user with access to enterprise resources inlieu of traditional Virtual Private Networks (VPNs).

Cloud computing systems and methods abstract away physical servers,storage, networking, etc. and instead offer these as on-demand andelastic resources. The National Institute of Standards and Technology(NIST) provides a concise and specific definition which states cloudcomputing is a model for enabling convenient, on-demand network accessto a shared pool of configurable computing resources (e.g., networks,servers, storage, applications, and services) that can be rapidlyprovisioned and released with minimal management effort or serviceprovider interaction. Cloud computing differs from the classicclient-server model by providing applications from a server that areexecuted and managed by a client's web browser or the like, with noinstalled client version of an application required. Centralizationgives cloud service providers complete control over the versions of thebrowser-based and other applications provided to clients, which removesthe need for version upgrades or license management on individual clientcomputing devices. The phrase “software as a service” (SaaS) issometimes used to describe application programs offered through cloudcomputing. A common shorthand for a provided cloud computing service (oreven an aggregation of all existing cloud services) is “the cloud.” Thecloud-based system 100 is illustrated herein as one example embodimentof a cloud-based system, and those of ordinary skill in the art willrecognize the systems and methods described herein contemplate operationwith any cloud-based system.

In an embodiment, the cloud-based system 100 can be a distributedsecurity system or the like. Here, in the cloud-based system 100,traffic from various locations (and various devices located therein)such as the regional office 110, the headquarters 120, variousemployee's homes 130, laptops/desktops 140, and mobile devices 150 canbe monitored or redirected to the cloud through the cloud nodes 102.That is, each of the locations 110, 120, 130, 140, 150 iscommunicatively coupled to the Internet 104 and can be monitored by thecloud nodes 102. The cloud-based system 100 may be configured to performvarious functions such as spam filtering, uniform resource locator (URL)filtering, antivirus protection, bandwidth control, DLP, zero-dayvulnerability protection, web 2.0 features, and the like. In anembodiment, the cloud-based system 100 may be viewed asSecurity-as-a-Service through the cloud, such as the IA. For example,the cloud-based system 100 can be used to block or allow access to websites, and such access control can be based in part on the web crawlersystems and methods described herein to identify malicious sites.

In an embodiment, the cloud-based system 100 can be configured toprovide mobile device security and policy systems and methods. Themobile device 150 may be a mobile device 200 (as illustrated in FIG. 3)and may include common devices such as laptops, smartphones, tablets,netbooks, personal digital assistants, MP3 players, cell phones, e-bookreaders, and the like. The cloud-based system 100 is configured toprovide security and policy enforcement for devices, including themobile devices 150 in the cloud.

Advantageously, the cloud-based system 100, when operating as adistributed security system, avoids platform-specific security apps onthe mobile devices 150, forwards web traffic through the cloud-basedsystem 100, enables network administrators to define policies in thecloud, and enforces/cleans traffic in the cloud prior to delivery to themobile devices 150. Further, through the cloud-based system 100, networkadministrators may define user-centric policies tied to users, notdevices, with the policies being applied regardless of the device usedby the user. The cloud-based system 100 provides 24×7 security with noneed for updates as the cloud-based system 100 is always up-to-date withcurrent threats and without requiring device signature updates. Also,the cloud-based system 100 enables multiple enforcement points,centralized provisioning, and logging, automatic traffic routing to thenearest cloud node 102, the geographical distribution of the cloud nodes102, policy shadowing of users, which is dynamically available at thecloud nodes 102, etc.

Example Server Architecture

FIG. 2 is a block diagram of a server 200, which may be used in thecloud-based system 100, in other systems, or standalone. For example,the cloud nodes 102 may be formed as one or more of the servers 200. Theserver 200 may be a digital computer that, in terms of hardwarearchitecture, generally includes a processor 202, Input/Output (I/O)interfaces 204, a network interface 206, a data store 208, and memory210. It should be appreciated by those of ordinary skill in the art thatFIG. 2 depicts the server 200 in an oversimplified manner, and apractical embodiment may include additional components and suitablyconfigured processing logic to support known or conventional operatingfeatures that are not described in detail herein. The components (202,204, 206, 208, and 210) are communicatively coupled via a localinterface 212. The local interface 212 may be, for example, but notlimited to, one or more buses or other wired or wireless connections, asis known in the art. The local interface 212 may have additionalelements, which are omitted for simplicity, such as controllers, buffers(caches), drivers, repeaters, and receivers, among many others, toenable communications. Further, the local interface 212 may includeaddress, control, and/or data connections to enable appropriatecommunications among the aforementioned components.

The processor 202 is a hardware device for executing softwareinstructions. The processor 202 may be any custom made or commerciallyavailable processor, a central processing unit (CPU), an auxiliaryprocessor among several processors associated with the server 200, asemiconductor-based microprocessor (in the form of a microchip orchipset), or generally any device for executing software instructions.When the server 200 is in operation, the processor 202 is configured toexecute software stored within the memory 210, to communicate data toand from the memory 210, and to generally control operations of theserver 200 pursuant to the software instructions. The I/O interfaces 204may be used to receive user input from and/or for providing systemoutput to one or more devices or components.

The network interface 206 may be used to enable the server 200 tocommunicate on a network, such as the Internet 104. The networkinterface 206 may include, for example, an Ethernet card or adapter(e.g., 10BaseT, Fast Ethernet, Gigabit Ethernet, 10 GbE) or a WirelessLocal Area Network (WLAN) card or adapter (e.g., 802.11a/b/g/n/ac). Thenetwork interface 206 may include address, control, and/or dataconnections to enable appropriate communications on the network. A datastore 208 may be used to store data. The data store 208 may include anyof volatile memory elements (e.g., random access memory (RAM, such asDRAM, SRAM, SDRAM, and the like)), nonvolatile memory elements (e.g.,ROM, hard drive, tape, CDROM, and the like), and combinations thereof.Moreover, the data store 208 may incorporate electronic, magnetic,optical, and/or other types of storage media. In one example, the datastore 208 may be located internal to the server 200, such as, forexample, an internal hard drive connected to the local interface 212 inthe server 200. Additionally, in another embodiment, the data store 208may be located external to the server 200 such as, for example, anexternal hard drive connected to the I/O interfaces 204 (e.g., SCSI orUSB connection). In a further embodiment, the data store 208 may beconnected to the server 200 through a network, such as, for example, anetwork-attached file server.

The memory 210 may include any of volatile memory elements (e.g., randomaccess memory (RAM, such as DRAM, SRAM, SDRAM, etc.)), nonvolatilememory elements (e.g., ROM, hard drive, tape, CDROM, etc.), andcombinations thereof. Moreover, the memory 210 may incorporateelectronic, magnetic, optical, and/or other types of storage media. Notethat the memory 210 may have a distributed architecture, where variouscomponents are situated remotely from one another, but can be accessedby the processor 202. The software in memory 210 may include one or moresoftware programs, each of which includes an ordered listing ofexecutable instructions for implementing logical functions. The softwarein the memory 210 includes a suitable Operating System (O/S) 214 and oneor more programs 216. The operating system 214 essentially controls theexecution of other computer programs, such as the one or more programs216, and provides scheduling, input-output control, file and datamanagement, memory management, and communication control and relatedservices. The one or more programs 216 may be configured to implementthe various processes, algorithms, methods, techniques, etc. describedherein.

Example User Device Architecture

FIG. 3 is a block diagram of a user device 300, which may be used in thecloud-based system 100 or the like. Again, the user device 300 can be asmartphone, a tablet, a smartwatch, an Internet of Things (IoT) device,a laptop, etc. The user device 300 can be a digital device that, interms of hardware architecture, generally includes a processor 302,Input/Output (I/O) interfaces 304, a radio 306, a data store 308, andmemory 310. It should be appreciated by those of ordinary skill in theart that FIG. 3 depicts the user device 300 in an oversimplified manner,and a practical embodiment may include additional components andsuitably configured processing logic to support known or conventionaloperating features that are not described in detail herein. Thecomponents (302, 304, 306, 308, and 302) are communicatively coupled viaa local interface 312. The local interface 312 can be, for example, butnot limited to, one or more buses or other wired or wirelessconnections, as is known in the art. The local interface 312 can haveadditional elements, which are omitted for simplicity, such ascontrollers, buffers (caches), drivers, repeaters, and receivers, amongmany others, to enable communications. Further, the local interface 312may include address, control, and/or data connections to enableappropriate communications among the aforementioned components.

The processor 302 is a hardware device for executing softwareinstructions. The processor 302 can be any custom made or commerciallyavailable processor, a central processing unit (CPU), an auxiliaryprocessor among several processors associated with the user device 300,a semiconductor-based microprocessor (in the form of a microchip orchipset), or generally any device for executing software instructions.When the user device 300 is in operation, the processor 302 isconfigured to execute software stored within the memory 310, tocommunicate data to and from the memory 310, and to generally controloperations of the user device 300 pursuant to the software instructions.In an embodiment, the processor 302 may include a mobile-optimizedprocessor such as optimized for power consumption and mobileapplications. The I/O interfaces 304 can be used to receive user inputfrom and/or for providing system output. User input can be provided via,for example, a keypad, a touch screen, a scroll ball, a scroll bar,buttons, barcode scanner, and the like. System output can be providedvia a display device such as a Liquid Crystal Display (LCD), touchscreen, and the like.

The radio 306 enables wireless communication to an external accessdevice or network. Any number of suitable wireless data communicationprotocols, techniques, or methodologies can be supported by the radio306, including any protocols for wireless communication. The data store308 may be used to store data. The data store 308 may include any ofvolatile memory elements (e.g., random access memory (RAM, such as DRAM,SRAM, SDRAM, and the like)), nonvolatile memory elements (e.g., ROM,hard drive, tape, CDROM, and the like), and combinations thereof.Moreover, the data store 308 may incorporate electronic, magnetic,optical, and/or other types of storage media.

The memory 310 may include any of volatile memory elements (e.g., randomaccess memory (RAM, such as DRAM, SRAM, SDRAM, etc.)), nonvolatilememory elements (e.g., ROM, hard drive, etc.), and combinations thereof.Moreover, the memory 310 may incorporate electronic, magnetic, optical,and/or other types of storage media. Note that the memory 310 may have adistributed architecture, where various components are situated remotelyfrom one another, but can be accessed by the processor 302. The softwarein memory 310 can include one or more software programs, each of whichincludes an ordered listing of executable instructions for implementinglogical functions. In the example of FIG. 3, the software in the memory310 includes a suitable Operating System (O/S) 314 and programs 316. Theoperating system 314 essentially controls the execution of othercomputer programs, and provides scheduling, input-output control, fileand data management, memory management, and communication control andrelated services. The programs 316 may include various applications,add-ons, etc. configured to provide end-user functionality with the userdevice 300. For example, example programs 316 may include, but notlimited to, a web browser, social networking applications, streamingmedia applications, games, mapping and location applications, electronicmail applications, financial applications, and the like. In a typicalexample, the end-user typically uses one or more of the programs 316along with a network such as the cloud-based system 100.

Enterprise Application

FIG. 4 is a network diagram of the functionality of an exampleenterprise application 400 and associated connectivity. The enterpriseapplication 400 is executed on a user device 300. The enterpriseapplication 400 can dynamically learn all available services, adapts tochanging network environments, and provides a seamless and securenetwork resource access to Internet and darknet hosted applications.This is achieved through dynamic evaluation of network conditions,enrollment to individual services, learning individual serviceprotocols, creating a link-local network on the device 300, andestablishing multiple secure tunnels to cloud services over this localnetwork.

The enterprise application 400 is communicatively coupled to an agentmanager cloud 406, and a security cloud 408. Note, the security cloud408 can be implemented in the cloud-based system 100, etc. Theenterprise application 400 enables communication to enterprise privateresources 412 via the security cloud 408 and to the Internet 104 via thesecurity cloud 408. The agent manager cloud 406 can communicate withenterprise asset management 414, an enterprise Security Assertion MarkupLanguage (SAML) Identity Provider (IDP) 416, and an enterpriseCertificate Authority (CA) 418. The device 300 and the enterpriseapplication 400 can perform a registration/identity 320 process throughthe agent manager cloud 306 where the user identity, the user'scertificates, and a device fingerprint can uniquely identify the device300. Once registered, the enterprise application 400 has an identity322, which can include the user, certificates, device posture, etc. andwhich is shared with the security cloud 308.

The enterprise application 400 operates on a client-server model wherean Information Technology (IT) admin enables appropriate services forend-users at a Cloud Administration Server (CAS), which can be part ofan agent manager cloud 406, namely the enterprise asset management 414.Every client can make a unicast request to the agent manager cloud 406(e.g., CAS) to discover all enabled services. On acknowledging theresponse, the client issues a request to authenticate to each service'scloud Identity Providers, the enterprise SAML IDP 416. Authenticationcan be multi-factor depending upon the nature of the service. Onsuccessful authentication, server contacts Mobile Device Management(MDM) or Inventory management provider to define access control rightsfor the device 300. Post authorization, the device 300 is successfullyenrolled into the agent manager cloud 406, which tracks and monitors allbehavior of the device 300.

Post-enrollment, the device 300 creates a link-local network with aspecific Internet Protocol (IP) configuration, opens a virtual networkinterface to read and write packets, and opens multiple listeningsockets at custom ports to create secure tunnels to available servicesthrough the security cloud 408. On network changes, the device 300dynamically evaluates reachability to pre-configured domains, anddepending upon the result, it appropriately transitions all networktunnels, thus providing a seamless experience to the end-user. Further,the device 300 also intelligently learns the conditions which areappropriate for setting up network tunnels to cloud services dependingupon several network heuristics such as reachability to a particularcloud service.

Enterprise Application—Functionality

The enterprise application 400 enables a user to connect to multiplecloud services through the dynamic discovery of available servicesfollowed by authentication and access as exposed in the correspondingservice protocol. The enterprise application 400 addressed theunmanageable growth of mobility and cloud-based services, which have ledto a proliferation of individual applications for access to individualservices. The enterprise application 400 can be implemented through amobile application (“app”), which overcomes the hassle of deploying andmanaging several applications across a gamut of mobile devices,operating systems, and mobile networks to gain secure access to thecloud-based internet or intranet resources. The mobile application canuniquely perform a Dynamic evaluation of Network and Service Discovery,Unified Enrollment to all services, Application dependent serviceenablement, Service protocol learning, Service Availability throughsecure network traffic forwarding tunnels, and the like.

Again, enterprises have a strong need to provide secure access to cloudservices to its end users. The growth of mobility and cloud in the ITenterprise has made it impossible for IT admins to deploy individualapplications for individual services. The mobile app associated with thesystems and methods overcomes these limitations through the dynamicdiscovery of available services to the end-user, followed byauthentication and access to individual services. Further, the mobileapp insightfully learns the protocol for each service and establishes asecure tunnel to the service. In essence, the mobile app is one app thatan enterprise may use to provide secure connectivity to the Internet anddiversified internal corporate applications. At the time of userenrollment, the mobile app will discover all services provided by theenterprise cloud and will enroll the user to all of those services. Itwill then set up secure tunnels for each application depending uponwhether the application is internet bound or if it is internal to thecorporate network (intranet).

The mobile app will also discover all applications provided within theenterprise cloud along with a Global Virtual Private Network (GVPN)service and show the available services to end-user. EndpointApplications today provide one service for a specific network function(such as Virtual Private Network (VPN) to a corporate network, websecurity, antivirus to access the Internet). The mobile app can be usedto enable all these services with single enrollment. The mobile app willprovide services to darknet applications along with securing theInternet traffic. The mobile app can set up a local network on themobile device.

Generally, the enterprise application 400 can support two broadfunctional categories—1) dynamic service discovery and access controlsand 2) service availability. The dynamic service discovery and accesscontrols include service configuration by the administrator, servicediscovery by the device 300, service acknowledgment and authentication,service authorization and enrollment, and the like. For serviceconfiguration by the administrator, the IT admin can provide cloudservice details at a centralized knowledge server, such as part of theagent manager cloud 406, the enterprise asset management 414, etc. Thecloud service details include the service type (e.g.,Internet/intranet), network protocol, identity provider, server address,port, and access controls, etc.

For service discovery by the device 300, the device 300 can issue anetwork request to a known Cloud Administrative Server (CAS) in theagent manager cloud 406 to discover all enabled services for a user. Ifa specific cloud server is not known a priori, the device 404 canbroadcast the request to multiple clouds, e.g., through the agentmanager cloud 406 communicating to the enterprise asset management 414,the enterprise SAML IDP 416, and the enterprise CA 418.

For the service acknowledgment and authentication, the device 300acknowledges the response of service discovery and initiates theauthentication flow. The device 300 learns the authentication protocolthrough the service discovery configuration and performs authenticationof a configured nature at the enterprise SAML IDP 416. For the serviceauthorization and enrollment, post successful authentication, the CAS,authorizes the device 300, and fetches the access control information bycontacting an MDM/Inventory Solutions Provider. Depending upon the usercontext and the nature of access, the CAS enrolls the device 300 intoseveral cloud services and informs the cloud services that the user hasbeen enrolled for access.

The service availability includes link-local network setup, a trafficinterceptor, and dynamic traffic forwarding tunnels to authorizedservices. The link-local network setup, post-enrollment, has the device300 create a local network on the device 300 itself to manage variousnetworking functionalities. For the traffic interceptor, the device 300intercepts and evaluates all Internet traffic. Allowed traffic istunneled to the cloud services such as in the security cloud 408,whereas the rest of the traffic is denied as per enterprise policies.For the dynamic traffic forwarding tunnels to authorized services,depending upon the evaluation, the device 300 splits the traffic intothe different tunnel to individual cloud services such as in thesecurity cloud 408.

The enterprise application 400 is a single application that providessecure connectivity to the Internet 104 and darknet hosted applications,such as the private enterprise resources 412. The enterprise application400 communicates securely to the agent manager 406, which is controlledby an IT admin. The enterprise application 400 learns available servicesand authenticates with each service. Post proper enrollment, theenterprise application 400 securely connects to cloud services by meansof network tunnels.

Again, the enterprise application 400 is an example application, such asZApp from Zscaler, Inc. Other types of enterprise applications are alsocontemplated herein. In general, the enterprise application 400 isexecuted on the user device 300, typically in the background. Theenterprise application 400 enables some cloud-based functionality withthe user device 300 and the cloud-based system 100. Further, issues withthe enterprise application 400 are critical to resolve to ensureconnectivity and access to the cloud-based system 100.

PAC Parsing Process

A PAC file is a JavaScript function that determines whether web browserrequests (HTTP, HTTPS, and FTP) go directly to the destination or areforwarded to a web proxy server, such as one of the cloud nodes 102. Inan embodiment, the enterprise application 400 includes the PAC parsingfunction. For example, the enterprise application 400 can parse PACfiles to determine whether to proxy connections, where to proxyconnections (which cloud node 102), etc.

The JavaScript function contained in the PAC file defines the function:

function FindProxyForURL(url, host){ // ... } ret = FindProxyForURL(url,host);

The above JavaScript function can be executed in order to determine theproxy server (if any) to use for that URL. Without a PAC file, each userdevice 300 can be configured with a single proxy server for all URLs,and optionally, with excluded URLs that may be accessed directly. Thereare various JavaScript functions defined for PAC files, includinghostname based conditions, utility functions, URL/hostname basedconditions, time-based conditions, etc. For example, these may include:

Hostname based conditions isPlainHostName( ) dnsDomainIs( )localHostOrDomainIs( ) isResolvable( ) isInNet( ) URL/hostname basedconditions shExpMatch( ) Related utility functions dnsResolve( )myIpAddress( ) dnsDomainLevels( ) Time based conditions weekdayRange( )dateRange( ) timeRange( )

The PAC file is necessary to implement complex functions between thecloud system 100 and the user device 300.

As described herein, the implementation of the PAC file parser is suchthat all PAC functions do not need JIT to run PAC functions. Theimplementation is memory efficient.

FIG. 5 is a flowchart of a PAC parsing process 500. The PAC parsingprocess 500 can be implemented in the user device 300 for use with acloud service such as via the cloud-based system 100. The PAC parsingprocess 500 can be implemented as computer-readable code stored in anon-transitory computer-readable storage medium. The PAC parsing process500 can also be implemented in conjunction with the enterpriseapplication 400.

The PAC parsing process 500 includes the enterprise application 400downloading a PAC file and passing the content to a PAC parser (step502) and initializing the PAC parser with the content so that the PACparser is ready to use (step 504).

The PAC parsing process 500 further includes, when a user attempts toaccess network traffic from the user device 300 (step 506), the networktraffic (URL) coming to the enterprise application 400 that is alreadyrunning on the user device 300 (step 508). The enterprise application400 extracts the hostname from the URL and passes that hostname to thePAC parser (step 510). The input is the hostname used for the DNSresolution (step 512).

With the IP address, the PAC parsing process 500 includes checking theIP address range (step 514). If the IP address is in a certain range(step 514), the PAC parsing process 500 includes direct access, such asto a destination cloud (step 528). If the IP address is out of the range(step 514), the PAC parsing process 500 checks the hostname (step 516).Based on the hostname (step 516), the PAC parsing process 500 uses afirst destination proxy (step 518) or a second destination proxy (step520). The enterprise application 400 forwards the network traffic to thereturned proxy (step 520), and the traffic goes to the destination(steps 524, 526, 528).

For example, the process can include obtaining a Proxy Auto Config (PAC)file from a cloud service and initializing a PAC parser on the userdevice therewith; for a request to access a Uniform Resource Locator(URL), extracting a hostname and providing the hostname to the PACparser; and, based on an Internet Protocol (IP) address associated withthe hostname, one of i) sending the request direct to the Internetseparate from the cloud, ii) sending the request to a first proxyassociated with the cloud service, and iii) sending the request to asecond proxy associated with the cloud service.

The user device can include an operating system that does not supportJIT operation. The PAC parser performs a plurality of PAC functionswithout a Just-In-Time (JIT) compiler. The present disclosure uses anative OS-based JS engine (such as, a native iOS JS engine) to call codefrom JS (e.g., objective C code). For example, when a JS function iscalled in the PAC parser, such as dnsresolve, myipaddress, etc., thisfunction implementation is in a native language (Objective C in iOS) andthis implementation is called through native OS-based JS engine and itsoutput is returned back to the PAC parser. That is, the PAC parserexports all JS functions requiring JIT to this native implementationbridging with OS-based JS engine.

For example, in iOS, Apple's native JS engine allows a call to objectiveC code from Javascript. Thus, in an embodiment, dnsresolve andmyipaddress (both PAC functions) are overridden in JS and performed in anative language (e.g., Objective C). When this function executes in aPAC file, a call is made in JS (instead of JIT) to the native language,and the output is returned back to the JS function.

In an embodiment, the approach allows the use of PAC files that includeJIT functions without JIT support. That is, there is a call within JS toa native language and the output is returned. As such, PAC functionsrequiring JIT support are allowed in these scenarios.

The sending steps can be performed based on a prefix of the IP address.The sending steps to the first proxy and the second proxy can beperformed based on the hostname. The cloud service can be a cloud-basedsecurity system, and the first proxy and the second proxy are based onrules of the cloud-based security system.

The following is an example PAC file:

Function FindProxyForURL(URL, host) { var privateIP = /{circumflex over( )}(0|10|127|192|168|172...); var resolved_IP = dnsResolve(host); /* Donot send non-FQDN or private IP auths */ If(isPlainHostName(host) ||privateIP.test(resolved_IP) Return “DIRECT”;If(localHostOrDomainIs(host,”xxx.yyy”)) Return Proxy 1; /* DefaultTraffic Forwarding */ Return Proxy 2; }

In the above example, PAC file, dnsResolve (host) extracts the IPaddress from the hostname. This is an example function thattraditionally uses JIT, but can be called to a native language, asdescribed above. Multi proxy is used to distinguish traffic and decide adestination proxy based thereon. For example, corporate IT policy mayinclude all internal traffic goes to a first proxy whereas all publictraffic goes to a second proxy. Of course, various embodiments arepossible.

It will be appreciated that some embodiments described herein mayinclude one or more generic or specialized processors (“one or moreprocessors”) such as microprocessors; Central Processing Units (CPUs);Digital Signal Processors (DSPs): customized processors such as NetworkProcessors (NPs) or Network Processing Units (NPUs), Graphics ProcessingUnits (GPUs), or the like; Field Programmable Gate Arrays (FPGAs); andthe like along with unique stored program instructions (including bothsoftware and firmware) for control thereof to implement, in conjunctionwith certain non-processor circuits, some, most, or all of the functionsof the methods and/or systems described herein. Alternatively, some orall functions may be implemented by a state machine that has no storedprogram instructions, or in one or more Application-Specific IntegratedCircuits (ASICs), in which each function or some combinations of certainof the functions are implemented as custom logic or circuitry. Ofcourse, a combination of the aforementioned approaches may be used. Forsome of the embodiments described herein, a corresponding device inhardware and optionally with software, firmware, and a combinationthereof can be referred to as “circuitry configured or adapted to,”“logic configured or adapted to,” etc. perform a set of operations,steps, methods, processes, algorithms, functions, techniques, etc. ondigital and/or analog signals as described herein for the variousembodiments.

Moreover, some embodiments may include a non-transitorycomputer-readable storage medium having computer-readable code storedthereon for programming a computer, server, appliance, device,processor, circuit, etc. each of which may include a processor toperform functions as described and claimed herein. Examples of suchcomputer-readable storage mediums include, but are not limited to, ahard disk, an optical storage device, a magnetic storage device, aRead-Only Memory (ROM), a Programmable Read-Only Memory (PROM), anErasable Programmable Read-Only Memory (EPROM), an Electrically ErasableProgrammable Read-Only Memory (EEPROM), Flash memory, and the like. Whenstored in the non-transitory computer-readable medium, software caninclude instructions executable by a processor or device (e.g., any typeof programmable circuitry or logic) that, in response to such execution,cause a processor or the device to perform a set of operations, steps,methods, processes, algorithms, functions, techniques, etc. as describedherein for the various embodiments.

Although the present disclosure has been illustrated and describedherein with reference to preferred embodiments and specific examplesthereof, it will be readily apparent to those of ordinary skill in theart that other embodiments and examples may perform similar functionsand/or achieve like results. All such equivalent embodiments andexamples are within the spirit and scope of the present disclosure, arecontemplated thereby, and are intended to be covered by the followingclaims.

What is claimed is:
 1. A non-transitory computer-readable storage mediumhaving computer-readable code stored thereon for programming a userdevice to perform steps of: obtaining a Proxy Auto Config (PAC) filefrom a cloud service and initializing a PAC parser on the user devicetherewith; for a request to access a Uniform Resource Locator (URL),extracting a hostname and providing the hostname to the PAC parser; andbased on an Internet Protocol (IP) address associated with the hostname,one of i) sending the request direct to the Internet separate from thecloud, ii) sending the request to a first proxy associated with thecloud service, and iii) sending the request to a second proxy associatedwith the cloud service.
 2. The non-transitory computer-readable storagemedium of claim 1, wherein the user device includes an operating systemthat does not support a Just-In-Time (JIT) compiler.
 3. Thenon-transitory computer-readable storage medium of claim 2, wherein thePAC parser performs a plurality of PAC functions that require the JITcompiler via a call to code implemented in a native language.
 4. Thenon-transitory computer-readable storage medium of claim 1, wherein thesending steps are performed based on a prefix of the IP address.
 5. Thenon-transitory computer-readable storage medium of claim 1, wherein thesending steps to the first proxy and the second proxy are performedbased on the hostname.
 6. The non-transitory computer-readable storagemedium of claim 1, wherein the cloud service is a cloud-based securitysystem and the first proxy and the second proxy are based on rules ofthe cloud-based security system.
 7. The non-transitory computer-readablestorage medium of claim 6, wherein the first proxy is for privatetraffic and the second proxy is for public traffic.
 8. A user devicecomprising: a network interface communicatively coupled to a network; aprocessor communicatively coupled to the network interface; and memorystoring computer-executable instructions that, when executed, cause theprocessor to obtain a Proxy Auto Config (PAC) file from a cloud serviceand initializing a PAC parser on the user device therewith; for arequest to access a Uniform Resource Locator (URL), extract a hostnameand providing the hostname to the PAC parser; and based on an InternetProtocol (IP) address associated with the hostname, one of i) send therequest direct to the Internet separate from the cloud, ii) send therequest to a first proxy associated with the cloud service, and iii)send the request to a second proxy associated with the cloud service. 9.The user device medium of claim 8, wherein the user device includes anoperating system that does not support Just-In-Time (JIT) complier. 10.The user device medium of claim 9, wherein the PAC parser performs aplurality of PAC functions that require the JIT compiler via a call tocode implemented in a native language.
 11. The user device medium ofclaim 8, wherein the sending steps are performed based on a prefix ofthe IP address.
 12. The user device medium of claim 8, wherein thesending steps to the first proxy and the second proxy are performedbased on the hostname.
 13. The user device medium of claim 8, whereinthe cloud service is a cloud-based security system and the first proxyand the second proxy are based on rules of the cloud-based securitysystem.
 14. The user device medium of claim 13, wherein the first proxyis for private traffic and the second proxy is for public traffic.
 15. Amethod comprising: obtaining a Proxy Auto Config (PAC) file from a cloudservice and initializing a PAC parser on the user device therewith; fora request to access a Uniform Resource Locator (URL), extracting ahostname and providing the hostname to the PAC parser; and based on anInternet Protocol (IP) address associated with the hostname, one of i)sending the request direct to the Internet separate from the cloud, ii)sending the request to a first proxy associated with the cloud service,and iii) sending the request to a second proxy associated with the cloudservice.
 16. The method of claim 15, wherein the user device includes anoperating system that does not support a Just-In-Time (JIT) compiler.17. The method of claim 16, wherein the PAC parser performs a pluralityof PAC functions that require the JIT compiler via a call to codeimplemented in a native language.
 18. The method of claim 15, whereinthe sending steps are performed based on a prefix of the IP address. 19.The method of claim 15, wherein the sending steps to the first proxy andthe second proxy are performed based on the hostname.
 20. The method ofclaim 15, wherein the cloud service is a cloud-based security system andthe first proxy and the second proxy are based on rules of thecloud-based security system.